package com.luoye.lj.aop;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
//
//@Component
//@Aspect
@Deprecated
public class LogRecordAspect {
    private static Logger logger = LoggerFactory.getLogger(LogRecordAspect.class);

    @Around("execution(@com.luoye.lj.util.mvc.annotation.OperateLog * *(..))")
    public Object recordLog(ProceedingJoinPoint joinPoint) throws Throwable {
        Object[] args = joinPoint.getArgs();
        for(Object arg:args){
            logger.debug("arg->"+arg);
        }
        logger.debug("args->"+args.length);
        return joinPoint.proceed(args);
    }
}
